﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace MainProject
{
    public partial class MainMDIParent : UTLBASEFORM.MDIPARENT
    {
        public MainMDIParent()
        {
            InitializeComponent();
            
        }

        private void MDIParent_Load(object sender, EventArgs e)
        {
            LoadMenu();
            //for (int i = 0; i < 5; i++)
            //{
            //    Form f = new Form();
            //    f.Name = "name" + i.ToString();
            //    f.Text = "form" + i.ToString();
            //    f.MdiParent=this;
            //    f.Show();
            //}
        }
        /// <summary>
        /// Show menu ung voi tung user
        /// </summary>
        private void LoadMenu()
        { 
            //Show menu cha tab 1
            this.ShowTAB1("Quản Lý Sản Phẩm", null);
            //Show menu con tab 1
            this.ShowTAB1BTN1("Nhập Sản Phẩm", null);
            //show menu con tab 2
            this.ShowTAB2("Quản Lý Bán Hàng", null);
            //show menu cha tab 3
            this.ShowTAB3("Quản Lý Tìm Kiếm", null);
            //show menu con tab 3
            this.ShowTAB3BTN1("Sản Phẩm", null);
            this.ShowTAB3BTN2("Đơn Hàng", null);
            this.ShowTAB3BTN3("Khách Hàng", null);
            this.ShowTAB3BTN4("Nhân Viên", null);
            //show menu con tab 4
            this.ShowTAB4("Quản Lý Tem", null);
            //show menu con tab 5
            this.ShowTAB5("Quản Lý Báo Cáo", null);
            //show menu con tab 6
            this.ShowTAB6("Quản Lý Khách Hàng", null);

            //show menu con tab 7
            this.ShowTAB7("Quản Lý Nhân Viên", null);
            //show button 1 cau tab 7
            this.ShowTAB7BTN1("Quản Lý", null);

            //show menu con tab 8
            this.ShowTAB8("Quản Lý Hệ Thống", null);
            //show menu con tab 8
            this.ShowTAB8BTN1("Đơn Vị Tính", null);
   
        }
        protected override void tab1btn1_Click(object sender, EventArgs e)
        {
            InputProductForm.frmInputProduct frminput = new InputProductForm.frmInputProduct();
            frminput.MdiParent = this;
            frminput.Show();
        }

        /// <summary>
        /// Tim san pham
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override void tab3btn1_Click(object sender, EventArgs e)
        {
   

        }
        /// <summary>
        /// Tim don hang
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override void tab3btn2_Click(object sender, EventArgs e)
        {
            base.tab3btn2_Click(sender, e);
        }
        /// <summary>
        /// Tim khach hang
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override void tab3btn3_Click(object sender, EventArgs e)
        {
            base.tab3btn3_Click(sender, e);
        }
        /// <summary>
        /// Tim nhan vien
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override void tab3btn4_Click(object sender, EventArgs e)
        {
            base.tab3btn4_Click(sender, e);
        }

        /// <summary>
        /// Event cho form quan ly nhan vien
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override void  tab7btn1_Click(object sender, EventArgs e)
        {
            EmployeeForm.frmEmployee _frmEmployee = new EmployeeForm.frmEmployee();
            _frmEmployee.MdiParent = this;
            _frmEmployee.Show();
        }
        /// <summary>
        /// Event cho form fdon vi tinh
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected override void tab8btn1_Click(object sender, EventArgs e)
        {          
          
            UnitForm.UnitForm _UnitForm = new UnitForm.UnitForm();
            _UnitForm.MdiParent = this;
      
            _UnitForm.Show();
        }
    }
}